<?php 
	class DB {		
		function __construct() {					
		}
		
		function query ($sql) {				
			try {
				$dbh = new PDO("mysql:host=hazo.com.br;dbname=crepz631_siga",'crepz631_reg','abcd1234');		
			}
			catch(PDOException $e) {
				echo $e->getMessage();
			}
					
			$query = $dbh->query($sql);
			if(is_object($query)) {
				$res = $query->fetchAll(PDO::FETCH_ASSOC);				
			}
			else {
				$res = $query;
			}	
			return $res;	
		}
	}	
?>